package com.ldy.seal.vo;

import com.itextpdf.text.Image;
import com.itextpdf.text.Rectangle;

/**
 * 签章信息
 * 
 * @author lindeyi
 *
 */
public class SealInfo implements ISeal {

	private float x;

	private float y;

	private int page;


	/**
	 * @return the x
	 */
	public float getX() {
		return x;
	}


	/**
	 * @param x the x to set
	 */
	public void setX(float x) {
		this.x = x;
	}


	/**
	 * @return the y
	 */
	public float getY() {
		return y;
	}


	/**
	 * @param y the y to set
	 */
	public void setY(float y) {
		this.y = y;
	}


	/**
	 * @return the page
	 */
	public int getPage() {
		return page;
	}


	/**
	 * @param page the page to set
	 */
	public void setPage(int page) {
		this.page = page;
	}


	/**
	 * 获取签章范围
	* @param signImage 印章图片
	* @param scale     缩放比
	* @return Rectangle
	 */
	@Override
	public Rectangle getRectangle(Image signImage, float scale) {
		float halfHeight = signImage.getHeight() * (scale / 100);
		return new Rectangle(x, y, x + halfHeight, y + halfHeight);
	}
}
